import { Controller, Post, Body } from '@nestjs/common';
import { PublicConfigService } from './config.service';

import { ApiTags, ApiOperation } from '@nestjs/swagger';
import { PublicConfigDto } from './dto/config.dto';

@ApiTags("公共配置")
@Controller('public_config')
export class PublicConfigController {
  constructor(private readonly publicConfig: PublicConfigService) {}
  
  // 获取列表
  @ApiOperation({ summary: '获取公共配置' })
  @Post('PublicConfig')
  config(): Promise<PublicConfigDto> {
    return this.publicConfig.config();
  }
}
